<% layout('/layouts/default.html', {title: '发布版本', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<#form:form id="inputForm" model="${dcSupExamSumQuotaInfo}" action="${ctx}/quota/dcSupExamSumQuotaInfo/updateQuotaContent" method="post" class="form-horizontal">
		<div class="box-body">
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('考核年度')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:hidden path="isNewRecord"/>
							<#form:hidden path="examId" />
							<#form:hidden path="versionNumber" />
							<#form:hidden path="gradeOrg" />
							<#form:input path="examYear" class="form-control digits"  maxlength="4" readonly="true"/>
							<#form:hidden path="sumQuotaId" />
							<#form:hidden path="fileStatus" />
							<#form:hidden path="quotaContent" />

						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('指标类别')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:select path="quotaType" dictType="dc_quotaType_dan" blankOption="true"  data-placeholder="请选择"  class="form-control required" defaultValue="11"  />
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('序号')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="sortNum" class="form-control digits "  maxlength="4" placeholder="请输入数字"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('目标内容')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:textarea path="remarks2" rows="4" maxlength="255" class="form-control" placeholder="请输入目标内容：例 政务公开" />
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('单位')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="quotaUnit" maxlength="255" class="form-control " placeholder="例:亿元、万元、个、条、家、项、户等;若无则不填"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('考核评分单位')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="gradeOrgName" class="form-control  "  readonly="true"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('被考核单位')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="exameOrgNames" class="form-control  "  readonly="true"  onclick="selectOrg()"/>
							<#form:hidden path="exameOrgs"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('权数')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="quotaWeight" class="form-control  " placeholder="请输入数字"/>
						</div>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required  hide">*</span> ${text('本年度目标')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="currentYaerGoal" maxlength="255" class="form-control " placeholder="请输入本年度目标: 例 完成"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('上一年度目标任务')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="lastYaerGoal" maxlength="255" class="form-control "  placeholder="例: 完成、量化任务数"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('上一年度完成情况')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:input path="lastYearComplete" maxlength="255" class="form-control " placeholder="定性指标填写 完成 ；定量指标填写:量化任务数"/>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('考核方式')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:select path="assessMethod" dictType="dc_exam_assessment" blankOption="true"  data-placeholder="请选择" class="form-control " />
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> ${text('备注')}：<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:select path="remarks" dictType="dc_exam_remarks" blankOption="true"  data-placeholder="请选择" class="form-control " />
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="box-footer">
			<div class="row">
				<div class="col-sm-offset-5 col-sm-10">
					<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('提 交')}</button>&nbsp;
					<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
				</div>
			</div>
		</div>
	</#form:form>
</div>
</div>
<% } %>

<script>
	$("#inputForm").validate({
		submitHandler: function(form){
			var remarks2 = $("#remarks2").val();
			js.ajaxSubmitForm($(form), function(data){
				if(data.result == Global.TRUE){
					js.showMessage("操作成功");
					$(parent.document.getElementById("remarks3")).val(remarks2);
					var index = parent.layer.getFrameIndex(window.name);
					parent.layer.close(index);
				}else{
					js.showMessage(data.message);
				}
			}, "json");
		}
	});
	$("#btnCancel").click(function (){
		var index = parent.layer.getFrameIndex(window.name);
		$(parent.document.getElementById("remarks3")).val($("#remarks2").val());
		parent.layer.close(index);
	})

	function selectOrg(){
		layer.open({
			type: 2,
			title: ['选择机构'],
			area: ['850px', '600px'],
			content: "${ctx}/notice/dcSupExamNotice/getSixTeenFiveOrg?ids="+$("#exameOrgs").val()+"&param=${dcSupExamSumQuotaInfo.gradeOrg}",
			success:function (layero,index){
				var iframe = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
				//iframe.child($("#noticeOrgs").val(),$("#noticeOrgNames").val());
			}
		});
	}

</script>